import subprocess

class EdgePath:
    _edge_path = r'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
    _edge_driver_path = r'C:\Program Files (x86)\Microsoft\Edge\Application\msedgedriver.exe'
    
    @classmethod
    def get_edge_path(cls) -> str:
        """获取 Edge 浏览器的路径"""
        return cls._edge_path
    
    @classmethod
    def get_edge_driver_path(cls) -> str:
        """获取 Edge 驱动的路径"""
        return cls._edge_driver_path
    
def edge_page(port: int, edge_path : str= EdgePath.get_edge_path()) -> None:
    subprocess.Popen(
        [
            edge_path, 
            f'--remote-debugging-port={port}',
            ]
    )

if __name__ == '__main__':
    edge_page(9222)